<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>

<!DOCTYPE html>
<html class="pixel-ratio-1 android android-2 android-2-3-6"><head>
	<c:set var="ctx" value="${pageContext.request.contextPath}" />
    <title>游戏下载</title>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">

    <meta name="description" content="">

    <link rel="stylesheet" href="${ctx }/templates/default/skins/default/h5/lib/weui.min.css">
    <link rel="stylesheet" href="${ctx }/templates/default/skins/default/h5/css/jquery-weui.css">
    <link rel="stylesheet" href="${ctx }/templates/default/skins/default/h5/css/demos.css">

    <script src="${ctx }/templates/default/skins/default/h5/lib/jquery-2.1.4.js"></script>
    <script src="${ctx }/templates/default/skins/default/h5/lib/fastclick.js"></script>
    <script type="text/javascript" src="${ctx }/templates/default/skins/default/h5/js/swiper.js" charset="utf-8"></script>
    <script src="${ctx }/templates/default/skins/default/h5/js/jquery-weui.js"></script>

    <style>
        .swiper-container, .swiper-slide {
            margin-top: -8px;
            width: 720px;
        }
        .swiper-container {
            width: 100%;
        }

        .swiper-container img {
            display: block;
            width: 100%;
        }

        *{margin:0; padding:0;}
        img{max-width: 100%; height: auto;}

        .weui-flex .down_body{
            width: auto;
            height: 150px;
            background-image:url(${ctx }/upload/down_body_bg.png);
            display: flex;
            align-items: center;
        }

        .down_name {
            margin: 5px;
            height: 1.3em;
            line-height: 1.3em;
            text-align: center;
            color: #000000;
            font-size: 20px;
            font-weight:bold;
        }

        .update_time {
            margin: 5px;
            height: 2.3em;
            line-height: 2.3em;
            text-align: center;
            font-size: 12px;
            color: #808080;
        }
    </style>
</head>

<body ontouchstart="">
<div>
    <img src="${ctx }/upload/down_top_bar.png" alt="">
</div>
<div class="swiper-container swiper-container-horizontal swiper-container-android">
    <div class="swiper-wrapper" style="transform: translate3d(-786px, 0px, 0px); transition-duration: 0ms;"><div class="swiper-slide swiper-slide-duplicate swiper-slide-next" data-swiper-slide-index="0" style="width: 393px;"><img src="${ctx }/upload/swiper_0.png" alt=""></div>
        <div class="swiper-slide swiper-slide-prev" data-swiper-slide-index="0" style="width: 393px;"><img src="${ctx }/upload/swiper_0.png" alt=""></div>
        <!--<div class="swiper-slide"><img src="upload/swiper_1.jpg" alt=""></div>-->
        <!--<div class="swiper-slide"><img src="upload/swiper_2.jpg" alt=""></div>-->
    <div class="swiper-slide swiper-slide-duplicate swiper-slide-active" data-swiper-slide-index="0" style="width: 393px;"><img src="${ctx }/upload/swiper_0.png" alt=""></div></div>
    <div class="swiper-pagination swiper-pagination-bullets"><span class="swiper-pagination-bullet swiper-pagination-bullet-active"></span></div>
</div>

<div class="weui-flex" style="height: 180px;background-image:url(${ctx }/upload/down_body_bg.png);display: flex;align-items: center;">
    <div style="width: 25%">
        <div style="margin: 0.5rem;">
            <img src="${ctx }/upload/down_logo.png" alt="">
        </div>
    </div>
    <div class="weui-flex__item">
        <a href="javascript:isWinxinTip(1);">
            <div class="down_name" style="text-align: right;"> 乐游盒子</div>
            <div class="update_time">更新:2017.01.24</div>
            <img src="${ctx }/upload/down_bt_android.png" alt="">
        </a>
    </div>
    <div class="weui-flex__item" style="margin: 0.5rem;">
        <a href="javascript:isWinxinTip(2);">
            <div class="down_name" style="margin-left: 0px;text-align: left;">(46.9M)</div>
            <div class="update_time"></div>
            <img src="${ctx }/upload/down_bt_ios.png" alt="">
        </a>
    </div>
</div>

<div class="weui-flex">
    <div class="weui-flex__item">
        <div style="text-align: center;">
            <img src="${ctx }/templates/default/skins/default//images/we_code.jpg" width="50%" alt="">
        </div>
    </div>
</div>

<div class="weui-footer">
    <p class="weui-footer__links">
        <a href="javascript:void(0);" class="weui-footer__link">湖南乐和信息技术有限公司</a>
    </p>
    <p class="weui-footer__text">Copyright © 2016-2017 lehexinxi.com</p>
</div>

<script>
    $(function() {
        FastClick.attach(document.body);
    });
    $(".swiper-container").swiper({
        loop: true,
        autoplay: 3000
    });
</script>

<script type="text/javascript">
    //var isWeixin = is_weixin();
    var winHeight = typeof window.innerHeight != 'undefined' ? window.innerHeight : document.documentElement.clientHeight;

    function isWinxinTip(type) {
    	if(!is_weixin()){
    		if(type==1){
    			window.location.href = "http://down.lehexinxi.com/cards/PlayCards.apk";
    		}else{
    			window.location.href = "https://itunes.apple.com/cn/app/tou-xian-di-xing-qi-tian/id414478124?mt=8";
    		}
    		return;
    	}
        var cssText = "#weixin-tip{position: fixed; left:0; top:0; background: rgba(0,0,0,0.8); filter:alpha(opacity=80); width: 100%; height:100%; z-index: 100;} #weixin-tip p{text-align: center; margin-top: 10%; padding:0 5%;}";
        //if(isWeixin){
            loadHtml();
            loadStyleText(cssText);
            return false;
        //}
    }

    function is_weixin() {
        var ua = navigator.userAgent.toLowerCase();
        if (ua.match(/MicroMessenger/i) == "micromessenger") {
            return true;
        } else {
            return false;
        }
    }
    function loadHtml(){
        var div = document.createElement('div');
        div.id = 'weixin-tip';
        div.innerHTML = '<p><img src="${ctx }/templates/default/skins/default/h5/images/live_weixin.png" alt="微信打开"/></p>';
        document.body.appendChild(div);
    }

    function loadStyleText(cssText) {
        var style = document.createElement('style');
        style.rel = 'stylesheet';
        style.type = 'text/css';
        try {
            style.appendChild(document.createTextNode(cssText));
        } catch (e) {
            style.styleSheet.cssText = cssText; //ie9以下
        }
        var head=document.getElementsByTagName("head")[0]; //head标签之间加上style样式
        head.appendChild(style);
    }
</script>
<script src="${ctx }/templates/default/skins/default/h5/lib/jquery-2.1.4.js"></script>
<script src="${ctx }/templates/default/skins/default/h5/lib/fastclick.js"></script>
<script>
    $(function() {
        FastClick.attach(document.body);
    });
</script>
<script src="${ctx }/templates/default/skins/default/h5/js/jquery-weui.js"></script>

</body></html>